home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
eag.h.z
/
eag.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
3KB
|
111 lines
/**************************************************************************
* *
* Copyright (C) 1989, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __SYS_EAG_H__
#define __SYS_EAG_H__
#ident "$Revision: 1.8 $"
/*
* Data types for Extended Attributes (plan G).
*
*/
#ifdef TRUSTEDIRIX
#include <sys/mac_label.h>
/*
* mandatory access control (mac):
* Two files:
* EAG_MAC_INDEX - index and size of an entry in ...
* EAG_MAC_LABEL - the label itself.
*/
#define EAG_MAC_INDEX "attribute/mac_index"
#define EAG_MAC_LABEL "attribute/mac_label"
/*
* If EAG_MAC_DIRECT the label is stored in the index
* entry rather than the label file.
*/
#define EAG_MAC_DIRECT 0x00000001 /* Direct entry */
/*
* The maximum size of data to put into a direct index file entry.
* Use as much as possible, but leave the flags alone.
*/
#define EAG_MAC_DIRECT_MAX (sizeof (int) + sizeof (int))
/*
* Special values for the i_plang field of inode.h
*/
#define EAG_REREAD -1 /* do not trust this value - do reread */
#define EAG_NOREREAD -2 /* trust this value - do no reread */
/*
* Structure of an entry in the EAG_MAC_INDEX file.
*/
struct eag_mac_index_s {
unsigned int emi_index; /* Index of label in the label file */
unsigned int emi_size; /* Size of label, in bytes */
unsigned int emi_flags; /* Flags reguarding this entry */
};
typedef struct eag_mac_index_s eag_mac_index_t;
/*
* Structure of the in-core index to label pointer mapping.
*/
struct eag_mac_incore_s {
struct eag_mac_incore_s *emc_next; /* Next in this list */
mac_label *emc_label; /* Pointer to label table */
unsigned int emc_index; /* Index in the label file */
};
typedef struct eag_mac_incore_s eag_mac_incore_t;
/*
* Data to add to the mount table. Includes the inode pointers for
* EAG_MAC_INDEX and RAG_MAC_LABEL and the in-core index-label list.
*/
struct eag_mac_mount_s {
struct inode *emm_index; /* inode->data map file */
struct inode *emm_label; /* label data file */
eag_mac_incore_t *emm_list; /* in-core mapping */
mac_label *emm_noplang; /* label to use if not plang */
mac_label *emm_ipmac; /* label to use for NFS */
};
typedef struct eag_mac_mount_s eag_mac_mount_t;
/*
* Structure for syssgi(SGI_PLANGMOUNT)'s first parameter.
* It's really the mount arguments stuffed into a structure.
*/
struct eag_plangmount_s {
char *epm_fspec;
char *epm_freg;
int epm_flags;
int epm_fstyp;
char *epm_dataptr;
int epm_datalen;
};
typedef struct eag_plangmount_s eag_plangmount_t;
/* function prototypes */
#ifdef _KERNEL
extern struct inode *eag_init( char *, struct inode * );
extern void eag_close( struct inode * );
extern void eag_mac_init( struct mount * );
extern void eag_mac_get( struct inode * );
extern int eag_mac_set( struct inode * );
extern int eag_mac_set( struct inode * );
extern int eag_mld_name( struct inode *, mac_label *, char *);
#endif /* _KERNEL */
#endif /* TRUSTEDIRIX */
#endif /* __SYS_EAG_H__ */